package com.emmmya.ocs.modules.system.dao.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.emmmya.ocs.modules.system.entity.UserRole;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @description:
 * @author: 咕噜肉IT小店-黑医
 * @createDate: 2020-05-26
 * @version: 1.0
 */
@Repository
public interface UserRoleMapper extends BaseMapper<UserRole> {

    List<UserRole> findByRoleId(@Param("roleId")Long roleId);

    List<UserRole> findByUserId(@Param("userId")Long userId);

    UserRole findByRoleIdAndUserId(@Param("roleId")Long roleId, @Param("userId")Long userId);

    void deleteByUserId(@Param("userId")Long userId);
}
